import * as API from './index'

//获取商品列表
export const getProlist = (params)=>{
    return API.GET('/api/v1/admin/products',params)
}

//增加商品
export const addProduct = (params)=>{
    return API.POST('/api/v1/admin/products',params)
}


//修改商品
export const editProduct = (params)=>{
    return API.PUT('/api/v1/admin/products/'+params._id,params)
}

//删除商品
export const deleteProduct = (params)=>{
    return API.DELETE('/api/v1/admin/products/'+params)
}